<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/base.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css">
  <link rel="stylesheet" href="<%=basePath %>css/font-awesome.css">
  <link rel="stylesheet" href="<%=basePath %>css/style.css">
	<style type="text/css">
		body{
			padding-top: 60px;
			
		}
	</style>
	<title>Kaishengit Todo-计划列表</title>
</head>
<body>
	<div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" style="color:#fff" href="#">Kaishengit Todo</a>
          <div class="btn-group pull-right">
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
               <i class="icon-user"></i>　${sessionScope.curr_user.username }
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li><a href="#"><i class="icon-cog"></i>　密码设置</a></li>
              <li class="divider"></li>
              <li><a href="#"><i class="icon-off"></i>　安全退出</a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <div class="container">
    	<div class="row">
    		
    		<div class="span12">
          
			 <div class="widget widget-table">
				<div class="widget-header">
					<i class="icon-list"></i><h3>计划列表</h3>
					<a href="<%=basePath %>todo/new.action" class="btn btn-success">新增计划</a>
				</div>
				<div class="widget-content">
					<table class="table table-striped">
						<tr>
							<th width="90%">计划</th>
							<th>操作</th>
						</tr>
						<c:forEach items="${todoList }" var="td">
							<c:choose>
								<c:when test="${!td.success}">
									<tr>
										<td>${td.todo }</td>
										<td>
											<a href="<%=basePath%>todo/success.action?id=${td.id}">完成</a>
											<a href="<%=basePath%>todo/edit.action?id=${td.id}">修改</a>
										</td>
									</tr>
								</c:when>
								<c:otherwise>
									<tr>
										<td><span style="text-decoration:line-through;color:#ccc">${td.todo }</span></td>
										<td>
											<a href="<%=basePath%>todo/del.action?id=${td.id}">删除</a>
										</td>
									</tr>
								</c:otherwise>
							</c:choose>
						</c:forEach>
						
					</table>
				</div>
			 </div>
            
            
        </div>
    	</div>

    </div>
    <div id="footer">
      <div class="container">       
        <hr>
        <p>© 2012 凯盛软件.</p>
      </div> <!-- /container -->
    </div>
    <script src="<%=basePath %>js/jquery.js" type="text/javascript"></script>
    <script src="<%=basePath %>js/bootstrap.min.js" type="text/javascript"></script>

</body>
</html>